home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
mquery
/
mfind.frm
< prev
next >
Wrap
Text File
|
1995-05-02
|
5KB
|
187 lines
VERSION 2.00
Begin Form fFind
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "Find Record"
ClientHeight = 2370
ClientLeft = 2025
ClientTop = 2625
ClientWidth = 5070
ControlBox = 0 'False
Height = 2775
Left = 1965
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2412
ScaleMode = 0 'User
ScaleWidth = 5160
Top = 2280
Width = 5190
Begin ListBox cFieldList
BackColor = &H00FFFFFF&
Height = 1368
Left = 240
TabIndex = 2
Tag = " OL"
Top = 360
Width = 1692
End
Begin ListBox cOpsList
BackColor = &H00FFFFFF&
Height = 1368
Left = 2040
TabIndex = 7
Tag = " OL"
Top = 360
Width = 960
End
Begin TextBox cExpr
BackColor = &H00FFFFFF&
Height = 287
Left = 3120
TabIndex = 1
Tag = " OL"
Top = 360
Width = 1811
End
Begin CheckBox cMatchCase
BackColor = &H00C0C0C0&
Caption = "Match Case"
Height = 252
Left = 3120
TabIndex = 8
Top = 839
Width = 1811
End
Begin CommandButton OkayButton
Caption = "&OK"
Default = -1 'True
Enabled = 0 'False
Height = 372
Left = 600
TabIndex = 4
Top = 1919
Width = 1691
End
Begin CommandButton CancelButton
Cancel = -1 'True
Caption = "&Cancel"
Height = 372
Left = 2879
TabIndex = 5
Top = 1919
Width = 1691
End
Begin Label OpsLabel
BackColor = &H00C0C0C0&
Caption = "Operators:"
Height = 192
Left = 2039
TabIndex = 6
Top = 120
Width = 971
End
Begin Label FieldListLabel
BackColor = &H00C0C0C0&
Caption = "Fields:"
Height = 192
Left = 240
TabIndex = 3
Top = 120
Width = 1092
End
Begin Label ExprLabel
BackColor = &H00C0C0C0&
Caption = "Value or Expression:"
Height = 192
Left = 3120
TabIndex = 0
Top = 120
Width = 1811
End
End
Option Explicit
Dim FNotFound As Integer
Sub OkayButton_Click ()
Dim i As Integer
On Error GoTo FindErr
i = cFieldList.ListIndex
FNotFound = False
SetHourGlass Me
gstFindField = cFieldList
gstFindExpr = cExpr
gstFindOp = cOpsList
gfFindMatch = cMatchCase
Hide
GoTo FindEnd
FindErr:
If Err <> EOF_ERR Then
ShowError
Resume FindEnd
Else
FNotFound = True
Resume Next
End If
FindEnd:
ResetMouse Me
End Sub
Sub CancelButton_Click ()
Hide
'set the flag for the dynaset/dynagrid form
gfFindFailed = True
End Sub
Sub cExpr_Change ()
If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
OkayButton.Enabled = True
Else
OkayButton.Enabled = False
End If
End Sub
Sub cFieldList_Click ()
If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
OkayButton.Enabled = True
Else
OkayButton.Enabled = False
End If
End Sub
Sub cOpsList_Click ()
If cFieldList <> "" And cOpsList <> "" And cExpr <> "" Then
OkayButton.Enabled = True
Else
OkayButton.Enabled = False
End If
End Sub
Sub Form_Load ()
Me.Left = (screen.Width - Me.Width) / 2
Me.Top = (screen.Height - Me.Height) / 2
FNotFound = False
cOpsList.AddItem "="
cOpsList.AddItem "<>"
cOpsList.AddItem ">="
cOpsList.AddItem "<="
cOpsList.AddItem ">"
cOpsList.AddItem "<"
cOpsList.AddItem "Like"
End Sub
Sub Form_Paint ()
Outlines Me
End Sub